package authorization_code_postgres

import (
	"context"
	"fmt"

	"github.com/cloudwego/hertz/pkg/app"
	"github.com/cloudwego/hertz/pkg/app/server"
)

type oauth2Client struct {
}

func (r oauth2Client) Init(hertz *server.Hertz) {
	group := hertz.Group("/client")
	group.GET("/redirect_uri", r.redirectUri())
}

func (r oauth2Client) redirectUri() app.HandlerFunc {
	return func(c context.Context, ctx *app.RequestContext) {
		fmt.Println(string(ctx.URI().FullURI()))
	}
}
